$dialog-background-color: $white !default;
$dialog-shadow: 0 22px 64px 0 rgba(0, 0, 0, 0.22) !default;
$dialog-title-background-color: rgba(#f3f5f7, 0.56) !default;
$dialog-title-border: none !default;
$dialog-title-padding: 0.6875rem 1.25rem !default;
$dialog-title-font-size: 1.25rem !default;
$dialog-title-line-height: 1.875rem !default;
$dialog-close-font-size: 1.25rem !default;
$dialog-close-color: $cool-grey !default;
$dialog-content-padding: 1.25rem !default;
$dialog-mask-background-color: $charcoal-grey !default;
$dialog-border-radius: $border-radius !default;

.rz-dialog {
  position: fixed;
  overflow: hidden;

  background-color: $dialog-background-color;
  box-shadow: $dialog-shadow;
  border-radius: $dialog-border-radius;
}

.rz-dialog-titlebar {
  background-color: $dialog-title-background-color;
  padding: $dialog-title-padding;
  font-size: $dialog-title-font-size;
  line-height: $dialog-title-line-height;
  border-bottom: $dialog-title-border;
}

.rz-dialog-titlebar-close {
  float: right;

  .rzi-times {
    font-size: $dialog-close-font-size;
    color: $dialog-close-color;
    vertical-align: middle;

    &:before {
      content: 'close';
    }
  }
}

.rz-dialog-content {
  padding: $dialog-content-padding;
  overflow: auto;
}

.rz-confirmdialog {
  top: 50%;
  left: 50%;
}

.rz-dialog-mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;

  background-color: $dialog-mask-background-color;
  opacity: 0.5;
}

.rz-dialog-footer {
  text-align: right;
  border: 0 none;
  padding: 1em;

  .rz-button {
    text-align: left !important;
    padding: 6px;
  }

  .rz-button:first-child {
    background-color: $primary;
    width: 80px;
  }

  .rz-button:last-child {
    background-color: $secondary;
    width: 105px;
  }
}

@media (max-width: 768px) {
  .rz-dialog {
    &:not(.rz-confirmdialog) {
      width: 100% !important;
      top: 0px !important;
    }
  }

  .rz-dialog-content {
    -webkit-overflow-scrolling: touch;
  }

  .no-scroll {
    padding-right: 0;
  }
}

.no-scroll {
  overflow: hidden;
  padding-right: 15px;
}

.rz-dialog-wrapper {
  display: flex;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  bottom: 0;
  z-index: 1001;
  align-items: center;
  justify-content: center;

  .rz-dialog {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    position: static;
  }

  .rz-dialog-content {
    flex: 0 1 auto;
    overflow: auto;
  }
}
